package com.hxf.service.user;

import java.util.List;

import com.hxf.dto.AdminRoleDto;
import com.hxf.dto.ReturnData;
import com.hxf.dto.UserDto;
import com.hxf.exception.ServiceException;
import com.hxf.service.base.BaseService;
import com.hxf.web.vo.UserRoleVo;

/**
 * 会员业务处理接口
 * @author tengyicheng
 * @version [1.0, 2013/09/22]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public interface UserService extends BaseService {
	/**
	 * 查询用户信息
	 * @param userDto
	 * @return
	 * @throws ServiceException
	 */
	public List<UserDto> findByUser(UserDto userDto, int targetPage, int pageSize)throws ServiceException;
	
	/**
	 * 查询所有角色和已绑定角色
	 * @param urDto
	 * @return
	 * @throws ServiceException
	 */
	public List<UserRoleVo> findByUserAddRole(AdminRoleDto urDto,Integer userId)throws ServiceException;
	
	/**
	 * 保存绑定角色
	 * @param userRoleDto
	 * @return
	 * @throws ServiceException
	 */
	public void saveUserAddRole(UserDto userDto, String roleIds)throws ServiceException;
	
	/**
	 * 登录
	 * @param userDto
	 * @return
	 * @throws ServiceException
	 */
	public int loginUser(UserDto userDto)throws ServiceException;
	
	/**
	 * 验证用户名是否存在
	 * @param userName
	 * @return
	 */
	public boolean validateUserName(String userName)throws ServiceException;
	
	/**
	 * 更新会员状态
	 * @param userDto
	 * @throws ServiceException
	 */
	public void updateUserStatus(String userIds, Integer status)throws ServiceException;
	
	/**
	 * 注册会员信息
	 * @param userDto
	 * @return
	 * @throws ServiceException
	 */
	public int saveUser(UserDto userDto) throws ServiceException;
	
	/*
	 * 查询登陆用户角色
	 */
	public AdminRoleDto selectUserRole(Integer userId) throws ServiceException;
	
	//检验该用户是否为超级管理员
	public UserDto selectUserOrAdmin(Integer userId) throws ServiceException;
}
